package cn.layfolk.uaa.domain;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 接入客户端信息
 * </p>
 *
 * @author ${author}
 * @since 2021-01-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="OauthClientDetails对象", description="接入客户端信息")
public class OauthClientDetails implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "客户端标识")
    private String clientId;

    @ApiModelProperty(value = "接入资源列表")
    private String resourceIds;

    @ApiModelProperty(value = "客户端秘钥")
    private String clientSecret;

    @ApiModelProperty(value = "作用域，一般用all")
    private String scope;

    @ApiModelProperty(value = "授权类型(授权码，客户端等)")
    private String authorizedGrantTypes;

    @ApiModelProperty(value = "重定向uri")
    private String webServerRedirectUri;

    @ApiModelProperty(value = "权限(自定义的一堆权限，逗号隔开)")
    private String authorities;

    @ApiModelProperty(value = "access_token过期时间")
    private Integer accessTokenValidity;

    private Integer refreshTokenValidity;

    private String additionalInformation;

    private Integer archived;

    private Integer trusted;

    private String autoapprove;

    @ApiModelProperty(value = "版本号")
    @Version
    private Integer version;

    @ApiModelProperty(value = "逻辑删除")
    @TableLogic
    private Integer deleted;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


}
